<!doctype html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>山东林业扶贫项目</title>
  <meta name="description" content="山东林业扶贫项目">
  <meta name="keywords" content="index">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="renderer" content="webkit">
  <meta http-equiv="Cache-Control" content="no-siteapp" />
  <link rel="icon" type="image/png" href="${ctxStatic}/sdlyfp/i/favicon.png">
  <link rel="apple-touch-icon-precomposed" href="${ctxStatic}/sdlyfp/i/app-icon72x72@2x.png">
  <meta name="apple-mobile-web-app-title" content="Amaze UI" />
  <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/amazeui.min.css" />
  <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/admin.css">
  <link rel="stylesheet" href="${ctxStatic}/sdlyfp/css/app.css">
  <script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
  <link rel="stylesheet" href="${ctxStatic}/sweetalert/sweetalert.css">
  <script src="${ctxStatic}/sweetalert/sweetalert.min.js"></script>
  <script src="${ctxStatic}/sdlyfp/js/base.js"></script>
  
</head>

<body data-type="generalComponents">

	<!-- head -->
	<jsp:include page="head.jsp" flush="false"></jsp:include>
	
	<div class="tpl-page-container tpl-page-header-fixed">
	
	<!-- 菜单 -->
	<jsp:include page="menu.jsp" flush="false"></jsp:include>


        
	<div class="tpl-content-wrapper">
            <div class="tpl-content-page-title">
                                    护林员岗位扶贫人
            </div>
            <ol class="am-breadcrumb">
                <li><a href="#" class="am-icon-home">首页</a></li> 
                <li class="am-active">护林员岗位扶贫人</li>
            </ol>
            <div class="tpl-portlet-components" style="padding-bottom: 150px;">
                <div class="portlet-title">
                    <div class="caption font-green bold">
                        <span class="am-icon-code"></span> ${gtPostPeople.post.name } ${not empty gtPostPeople.id?'修改':'添加'}帮扶带动建档立卡贫困人口信息
                    </div>
                    <div class="tpl-portlet-input tpl-fz-ml">
                        <div class="portlet-input input-small input-inline">
                            <div class="input-icon right">   
                                 </div>
                        </div>
                    </div>


                </div>
                <div class="tpl-block">

                    <div class="am-g">
                        <div class="tpl-form-body tpl-form-line">
                            <form class="am-form tpl-form-line-form" method="post" action="${ctx }/gt/gtPost/savePostPeople">
                            	<input type="hidden" id="id" name="id" value="${gtPostPeople.id }"/>
                            	<input type="hidden" id="oper" name="oper"/>
                            	<input type="hidden" id="post.id" name="post.id" value="${gtPostPeople.post.id }"/>
                            	
                            	<input type="hidden" id="menuId" name="menuId" value="${gtPostPeople.menuId }"/>
                            	
                                <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">姓名  </label>
                                    <div class="am-u-sm-9">
                                        <input type="text" class="tpl-form-input" id="name" name="name" value="${gtPostPeople.name }" placeholder=" ">
                                    </div>
                                </div>
								<div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">是否户主  </label>
                                    <div class="am-u-sm-9">
                                        <input type="radio" checked="checked" name="isHolder"  value="1" ${gtPostPeople.isHolder eq '1'?'checked':''}/>是 
                                        <input type="radio" name="isHolder"  value="0" ${gtPostPeople.isHolder eq '0'?'checked':''}/>否 
                                    </div>
                                </div>
								<div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">身份号  </label>
                                    <div class="am-u-sm-9">
                                        <input type="text" class="tpl-form-input" id="idcard" name="idcard" value="${gtPostPeople.idcard }" placeholder=" ">
                                    </div>
                                </div>
								<div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">家庭地址  </label>
                                    <div class="am-u-sm-9">
                                        <input type="text" class="tpl-form-input" id="address" name="address" value="${gtPostPeople.address }" placeholder=" ">
                                    </div>
                                </div>
                                
								<%-- <div class="am-form-group">
                                    <label for="user-name" class="am-u-sm-3 am-form-label">帮扶金额  </label>
                                    <div class="am-u-sm-9">
                                        <input type="text" class="tpl-form-input" id="money" name="money" value="${gtPostPeople.money }" placeholder=" ">
                                    </div>
                                </div>
								<div class="am-form-group">
                                    <label for="user-email" class="am-u-sm-3 am-form-label">帮扶时间 <span class="tpl-form-line-small-title"> </span></label>
                                    <div class="am-u-sm-9">
                                        <!-- <input type="text" class="am-form-field tpl-form-no-bg" name="moneyTime" placeholder="帮扶时间" data-am-datepicker="" readonly/> -->
                                        <input id="moneyTime" name="moneyTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
											value="<fmt:formatDate value="${gtPostPeople.moneyTime}" pattern="yyyy-MM-dd HH:mm:ss"/>"
											onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                                    </div>
                                </div> --%>


                                <div class="am-form-group">
                                    <div class="am-u-sm-9 am-u-sm-push-3">
                                        <button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success" onclick="doSubmit('list');">提交后返回</button>
										<c:if test="${empty gtPostPeople.id }">
											<button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success" onclick="doSubmit('form');">提交后继续添加</button>
										</c:if>
										<button type="button" class="am-btn am-btn-primary tpl-btn-bg-color-success" onclick="goBack();">返回，放弃修改</button>
                                    </div>
                                </div>
                            </form>

                        </div>
                    </div>
                </div>

                    </div>
                </div>
                <div class="tpl-alert"></div>
            </div>


        </div>


    </div>

  <script src="${ctxStatic}/sdlyfp/js/jquery.min.js"></script>
  <script src="${ctxStatic}/sdlyfp/js/amazeui.min.js"></script>
  <script src="${ctxStatic}/sdlyfp/js/app.js"></script>
</body>
<script type="text/javascript">
$(document).ready(function() {
	// $(".tpl-left-nav-menu").find("li a").eq(2).addClass("active");
	
	var menuId = '${gtPostPeople.menuId }';
	if(menuId)
	{
		$(".tpl-left-nav-menu").find("#"+menuId).addClass("active");
	}
	
	var message = "${message}";
	if(message)
	{
		var messageType = "${messageType}";
		msg(message,3000,messageType);
	}
});

function del(areaId)
{
	
	var content = "您确认要删除吗？";
	var url = ctx + "/gt/area/delete?id=" + areaId;
	comfirmMsg(content,url,"warning");
}

function doSubmit(oper)
{
	/* var town = $("#town").val();
	if(!town)
	{
		msg("区县请选择到乡镇。",3000,"warning");
		return;
	}
	var areaId = $("#town").find("option:selected").attr("areaId");
	$("#areaId").val(areaId); */
	if(isNull("姓名","name",'text')){return;}
	if(isNull("身份证号","idcard",'idcard')){return;}
	if(isNull("家庭地址","address",'text')){return;}
	/* if(isNull("帮扶金额","money",'number')){return;}
	if(isNull("帮扶时间","moneyTime",'text')){return;} */
	
	$("#oper").val(oper);
	document.forms[0].submit();
}

</script>
</html>